TEXTUTIL “Text editor Utilities”. The core of a text editor program. SIZE: 1512 bytes. ID #F0 01 DELETE #channel,record 03 FILESZR("filename") 04 INSERT #channel,record,"string" 05 REPLACE #channel,record,"string" 06 SEARCH(A$,col,start,end,channel) --------------------------------------------- TEXTUTIL gives 5 keywords and one poll hand- ler. The keywords are for easy control of TEXT (LIF1) files. The poll handler lets you LIST or PLIST a TEXT file, as if it were a BASIC file. (But you can't EDIT one). FILESZR (FILE SiZe in Records) tells how many records (lines) are in a TEXT file. DELETE gets rid of one record (line) in a TEXT file, and shrinks the file accordingly. INSERT adds a string as a new record, making the TEXT file grow accordingly. REPLACE is a combination of DELETE and INSERT which results in the file either growing or shrinking as needed. SEARCH looks through a TEXT file for a sub- string or wildcard pattern, and returns its position if found. For example, SEARCH("fonch",1,0,9999,2) looks through the TEXT file ASSIGNed to #2, starting at record 0 (the beginning) and stopping at record 9999 or the end (whichever comes first) at column 1 of record 0, for "fonch". If found, a num- ber of the form RRR.CCCLLL is returned, where RRR=record, CCC=column, and LLL=length. If not found, a 0 is returned. A search string can sspecify wildcards for pattern searches. The backslash (\) is used to turn the wildcard feature on and off. After a backslash, "." means "any one charac- ter", "@" means "any number of characters", "^" means "the beginning of the line", and "$" means "the end of the line". So searching for "\DOC$" would look for any line ending with "DOC".